The present invention relates to the field of electronic circuits, and, more particularly, to a method of managing a memory organized in a plurality of physical sectors.
Nonvolatile memories are characterized by their organization of data in physical sectors. A physical sector represents the minimum amount of data that can be erased, even if it is possible to read and write amounts of data smaller than a physical sector. The term xe2x80x9cpagexe2x80x9d is typically used to indicate such minimum amounts. Because of technology improvements, physical sectors have become greater and greater. This affects the management of blocks of data of relatively small size upon which reading, writing and erasing operations may be carried out independently from the rest of the stored data.
As a result of the importance of FLASH memories, the following description will refer to this type of memory, although the invention may be usefully implemented in any kind of nonvolatile memory. One problem associated with managing large physical sectors is found in the personal computer (PC) environment. This is because almost all of the applications for managing mass storage device memories in a PC (e.g., floppy disks, hard disks, memory cards, etc.) use data units of 512 bytes instead of tens or hundreds of Kbytes as is typical of a sector of a FLASH memory. Therefore, an internal organization of single physical sectors is needed to singularly manage each data portion.
A further problem of managing physical sectors of large dimensions is eliminating only a small amount of data in a sector while retaining the remaining data. This is problematic because in FLASH memories it is possible only to erase a whole physical sector and not just a portion of it. One approach to this problem may include having a memory sector (BUFFER) unaccessible by the user for copying and saving data before erasing a particular sector and then restoring the data when the erasing has taken place. To avoid adding a memory device, the BUFFER may be a dedicated sector of the FLASH memory unaccessible by the user. Yet, the sector dedicated to such a function will be subject to repeated programming and erasing cycles with a consequent accelerated degradation compared to other sectors of the FLASH memory.
It is an object of the invention to provide a method of managing a nonvolatile memory device and a related memory organization including physical sectors that permit reading and writing operations on portions of the memory having reduced dimensions by splitting a physical sector into a plurality of independently addressable logic sectors.
The method of the invention makes the user xe2x80x9cseexe2x80x9d a physical sector as if it included a number of blocks of data whose pre-established dimensions do not depend from the dimension of the physical sector of the memory. This allows reading, writing and erasing operations even on a single block. The method of the invention is relatively easy and may be implemented without great difficulty by an on board controller/finite state machine of the memory device.
In a memory device where a sector may be erased only as a whole, it is a further object of the invention to provide a method of erasing only a portion of data stored in a physical sector. This is done by using a dedicated unaccessible buffer sector of the memory and while overcoming the known problems of an excessively fast degradation of such a buffer sector.